<template>
	<div>
		<el-table :data="formData" style="width: 100%">
			<el-table-column label="头像">
				<template slot-scope="{row}">
					<el-image style="width:60px;height:60px" :src="row.avator" :preview-src-list="[row.avator]">
					</el-image>
				</template>
			</el-table-column>
			<el-table-column prop="name" label="老师名称" width="180">
			</el-table-column>
			<el-table-column prop="mobile" label="老师联系电话">
			</el-table-column>
			<el-table-column show-overflow-tooltip label="性别" prop="sex">
				<!-- 性别1男2女3保密 -->
				<template slot-scope="{row}">
					<el-tag v-if="row.sex == 1">男</el-tag>
					<el-tag v-if="row.sex == 2" type="success">女</el-tag>
					<el-tag v-if="row.sex == 3" type="info">保密</el-tag>
				</template>
			</el-table-column>
			<!-- <el-table-column
			    prop="course_name"
			    label="课程名称">
			  </el-table-column> -->
			<el-table-column label="开始时间" prop="start_time">
				<template slot-scope="{row}">
					{{ row.start_time | formatDate }}
				</template>
			</el-table-column>
			<el-table-column label="结束时间" prop="end_time">
				<template slot-scope="{row}">
					{{ row.end_time | formatDate }}
				</template>
			</el-table-column>
			<!-- 核销状态 0未核销 1已核销 -->
			<!-- <el-table-column label="核销类型">
			  	
			  	<template slot-scope="{row}">
			  		<el-tag v-if="row.verifiy_status==0">未核销</el-tag>
			  		<el-tag v-if="row.verifiy_status==1" type="success">已核销</el-tag>
			  	</template>
			  </el-table-column> -->

		</el-table>
	</div>
</template>

<script>
import { imghttp, get, post, del } from '@/assets/js/http'
// import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
export default {
	name: "member-search",
	props: {
		formData: {
			type: Array,
			default: () => []
		},
	},
	components: {
		// "el-upload-image": () => import("@/components/el-upload-image.vue"),
		// "maps": () => import("@/components/map/index.vue"),
		// Editor,
		// Toolbar
	},
	mounted() {
		// this.getcommuity() 
	},
	data() {
		return {
			// editor: null,
			// toolbarConfig: {},
			// editorConfig: {
			//     MENU_CONF: {
			//         uploadImage: {
			//             fieldName: "file",
			//             server: "/admin/ajax/upload",
			//             headers: {
			//                 batoken: this.$store.state.token
			//             },
			//             /* eslint-disable-next-line */
			//             customInsert(res, insertFn) {
			//                 insertFn(
			//                     "https://mtang.zxkjnc.com" + res.data.file.url
			//                 );
			//             }
			//         }
			//     }
			// },
			// mode: "default",
			// formRules: {
			// 	img: [{
			// 		required: true,
			// 		message: '请上传',
			// 		trigger: 'change'
			// 	}],
			// 	desc: [{required: true,message: '请输入',trigger: 'change'},],
			// 	location: [{required: true,message: '请输入',trigger: 'change'},],
			// 	activity_name: [{required: true,message: '请输入',trigger: 'change'},],
			// 	type: [{required: true,message: '请选择',trigger: 'change'},],
			// 	time: [{required: true,message: '请选择',trigger: 'change'},],
			// 	sign_num: [{required: true,message: '请输入',trigger: 'change'},],
			// 	sign_money: [{required: true,message: '请输入',trigger: 'change'}],
			// 	score: [{required: true,message: '请输入',trigger: 'change'}],
			// 	sort: [{required: true,message: '请输入',trigger: 'change'}],
			// 	community_id: [{required: true,message: '请选择',trigger: 'change'},],
			// },
			// title:'请上传1.5:1比例的图片',
			// typelist:[{id:1,title:'志愿者招募活动'},{id:2,title:'普通活动'}],//1志愿者招募活动2普通活动
			// comlist:[],//社区列表
			// paylist:['未支付','已支付'],////支付状态 0未支付 1已支付
		};
	},
	beforeDestroy() {
		// const editor = this.editor;
		// if (editor == null) return;
		// editor.destroy();
	},
	methods: {
		// onCreated(editor) {
		//     this.editor = Object.seal(editor);
		// },
		// onConfirm() {
		// 	// console.log(this.formData.desc)
		// 	// return
		// 	this.$refs.formRef.validate((valid) => {
		// 		if (valid) {
		// 			 this.formData.admin_id = this.$store.state.id
		// 			 // this.formData.time = [this.formData.time[0]/1000,this.formData.time[1]/1000]
		// 			 this.formData.start_time = this.formData.time[0]/1000
		// 			 this.formData.end_time= this.formData.time[1]/1000
		// 			 this.formData.latitude = this.formData.location.lat
		// 			 this.formData.longitude = this.formData.location.lng
		// 			// alert('submit!');
		// 			console.log(this.formData,this.formData.desc)
		// 			this.$emit("search", this.formData);
		// 			this.$parent.$emit("update:visible", false);
		// 			this.$refs.formRef.resetFields()
		// 		} else {
		// 			console.log('error submit!!');
		// 			return false;
		// 		}
		// 	});
		// },
		// onCancel() {
		// 	this.$parent.$emit("update:visible", false);
		// 	this.$refs.formRef.resetFields();
		// },
		// async getcommuity(){
		// 	await get({
		// 						url: '/admin/project.Community/index',
		// 	params: {
		// 							...this.searchParam,
		// 							...{
		// 								server_type: this.$route.query.type ? 2 : 1,
		// 								limit:9999
		// 								// search_time:this.searchParam.search_time.length?this.searchParam.search_time.join(' - '):''
		// 							}
		// 						}
		// 					}).then(res => {
		// 						this.comlist = res.list
		// 					})
		// }
	}
};
</script>
<!-- <style src="@wangeditor/editor/dist/css/style.css"></style> -->
